import request from "./index"

// 获取股票基本信息
export const getStockInfoApi = (stockId) => {
    return request.get('/stock/stockInfo', {
        params: {
            stockId: stockId
        }
    });
}

//获取股票简介
export const getStockDescApi = (stockId) => {
    return request.get('/stock/getStockDesc', {
        params: {
            stockId: stockId
        }
    });
}

export const getSearchForumApi = (stockId) => {
    return request.get('/forum/topLikedStockPosts', {
        params: {
            stockId: stockId
        }
    });
}

// 判断某只股票是否在自选股列表中
export const getIsWatchedApi = (stockId) => {
    return request.get('/watchlist/isInWatchlist', {
        params: {
            stockId: stockId
        }
    });
}